<!doctype html>
<html>
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<title>二手车评估消息</title>
<link href="../../css/newStyle.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../../js/common.js"></script>
<script type="text/javascript" src="../../js/gbRst.js"></script>
<script type="text/javascript" src="../../js/utils.js"></script>
<script type="text/javascript" src="../../js/openId.js"></script>
<script type="text/javascript" src="../../js/header&footer.js"></script>
<!-- <script type="text/javascript" src="../../js/carService.js"></script>
 --><script type="text/javascript" src="../../js/doubleDate2.0.js"></script>
<script type="text/javascript" src="../../js/check.js"></script>
<script type="text/javascript" src="../../js/qmsk-1.2.js"></script>
<script type="text/javascript">
$(function(){
	for(var i=0,attrDet=[];i<$(".messageAbb").length;i++){
		attrDet.push($(".messageAbb").eq(i).html());
	}//存储商品详情
	for(var i=0;i<$(".messageAbb").length;i++){
		$(".messageAbb").eq(i).html($(".messageAbb").eq(i).html().substr(0,40)+"…");	
	}
	$(".messageAbb").click(function(){
		if($(this).hasClass("showAbb")){
			$(this).html($(this).html().substr(0,40)+"…");
			$(this).removeClass("showAbb");
		}else{
		var index=$(".messageAbb").index(this);
		$(this).html(attrDet[index]);	
		$(this).addClass("showAbb");
		}
	})//精简显示消息
	
	getRecord()
})

function getRecord(){
	var userId = getIdByName("userId");
	 new qmsk.SiglePinterest({
			url : '../../../reassessRecord/find/reassessRecordListOfUserId', // 请求地址，插件会自动在 url 后追加 /n/n
			initPage : 1, // 首次加载页数
			size : 10, // 每次加载数量，即每页的大小
			success : printDataToPage, // 成功回调
			valves : 100 ,//当滚动条距离底部该像素的时候加载
			data:{'shopId':_shopId,'openId':_openId,'userId':userId},
			loading : addRefresh2,
			loaded : delRefresh,
			emptyHandler :showNoResult

		});
}

function showNoResult(){
	$("#noResult").show()
}

function printDataToPage(dt){
	for ( var i = 0; i < dt.row; i++) {
		var status= dt.getValue("status",i);
		var doType ="";
		var result = "";
		var xil = "";
		if(status==0){
		 doType ="<a class=\"workerReply\" href=\"javascript:void(0)\" onclick=\"goReply("+dt.getValue("id",i)+")\"></a>"

		}else{
			 xil  =" <div class=\"autoArrows\"></div>"
			 doType ="已完成"
			 result = "<div class=\"record replyWorker\"><article class=\"source\"><strong></strong><span class=\"thisName\">"+dt.getValue("cancelDate",i)+"</span></article><p>处理结果：<span>"+dt.getValue("result",i)+"</span></p></div>"

		}
		var htm  = "<div id='record_"+dt.getValue("id",i)+"' class=\"replyBox\"><div  class=\"record\"><article class=\"source\"><span class=\"thisName\">"+dt.getValue("submitDate",i)+"</span></article><p>客户姓名：<span>"+dt.getValue("customerName",i)+"</span></p><p>客户电话：<span><a href='tel:"+dt.getValue("mp",i)+"'> "+dt.getValue("mp",i)+"</a></span></p><p>车牌号：<span>"+dt.getValue("License",i)+"</span></p><p>预约时间：<span>"+dt.getValue("OrderDate",i).substring(0,10)+" "+dt.getValue("timeName",i)+"</span></p><p>备注：<span>"+dt.getValue("memo",i)+"</span></p>"+
		"<article class=\"source\">"+doType+"</article>"+xil+"</div>"+result+"</div>"
		$("#info").append(htm)
	}
	
}
function goReply(id){
	var htm = "?openId="+_openId+"&shopId="+_shopId+"&id="+id+"&flag="+4+"&userId="+getIdByName("userId");
 	redirectUrl('workerReply.html'+htm)	
}

function deleteInfo(id){
	var dt = _deleteInfo("../../../tryRecord/del", {"id":id});
	if(IsNotEmpty(dt)&&dt.state==0){
		$("#record_"+id).remove();
	}
	
}
function goMineDate(){
	var htm = "?openId="+_openId+"&shopId="+_shopId
 	redirectUrl('mineData.html'+htm)	
}
</script>
</head>

<body class="bgShade">
<div class="wrapper">
  <div class="container" id="info">
    <div class="placeTit"><a onclick = 'goMineDate()' href="javascript:void(0)" class="back"></a>二手车评估消息</div>
    <div class="noData" id="noResult" style="display: none;">
      <p class="Datatips">暂无二手车评估消息哦！</p>
    </div>
    <!-- <div class="replyBox">
      <div class="record">
        <article class="source"><span class="thisName">2014-03-15</span></article>
        <p>客户姓名：<span>冰-39</span></p>
        <p>客户电话：<span>15021103201</span></p>
        <p>备注：<span>备注一备注一备注一备注，一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备，注一备注一备注一备注一备注一备注一备注一备注一备注一</span></p>
        <article class="source"> <a href="workerReply.html" class="workerReply"></a> </article>
        <div class="autoArrows"></div>
      </div>
      <div class="record replyWorker">
        <article class="source"><strong></strong><span class="thisName">2014-03-15</span></article>
        <p>备注：<span>备注一备注一备注一备注，一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备注一备，注一备注一备注一备注一备注一备注一备注一备注一备注一</span></p>
        <aside class="nowData"><h3>处理结果</h3><details>汽车玻璃已更换，汽车轮胎有待更换</details></aside>
      </div>
    </div> -->
  </div>
</div>
</body>
</html>
